<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>/media/src/Dropbox/TC/SingleRoundMatch/SRM165/SRM165DIV2_250.h.html</title>
<meta name="Generator" content="Vim/7.2">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000"><font face="monospace">
<font color="#8080ff">//2009/08/09 15:45:29</font><br>
<font color="#ff40ff">#include </font><font color="#ff6060">&lt;string&gt;</font><br>
<font color="#ff40ff">#include </font><font color="#ff6060">&lt;vector&gt;</font><br>
<font color="#ff40ff">#include </font><font color="#ff6060">&lt;map&gt;</font><br>
<font color="#ff40ff">#include </font><font color="#ff6060">&lt;queue&gt;</font><br>
<font color="#ff40ff">#include </font><font color="#ff6060">&lt;algorithm&gt;</font><br>
<br>
<font color="#ffff00">using</font>&nbsp;<font color="#00ff00">namespace</font>&nbsp;std;<br>
<br>
<font color="#00ff00">class</font>&nbsp;BritishCoins<br>
{<br>
<font color="#ffff00">public</font>:<br>
&nbsp;&nbsp;&nbsp;&nbsp;vector &lt;<font color="#00ff00">int</font>&gt; coins(<font color="#00ff00">int</font>&nbsp;pence)<br>
&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vector&lt;<font color="#00ff00">int</font>&gt; ret;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.clear();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ff00">int</font>&nbsp;pound = pence / <font color="#ff6060">12</font>&nbsp;/ <font color="#ff6060">20</font>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pence %= <font color="#ff6060">12</font>*<font color="#ff6060">20</font>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.push_back(pound);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#00ff00">int</font>&nbsp;shilling = pence / <font color="#ff6060">12</font>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pence %= <font color="#ff6060">12</font>;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.push_back(shilling);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ret.push_back(pence);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ffff00">return</font>&nbsp;ret;<br>
&nbsp;&nbsp;&nbsp;&nbsp;}<br>
};<br>
</font></body>
</html>
